home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Peter Lewis / PNL Libraries / Assembly / ProfileHack.a < prev    next >
Encoding:
Text File  |  1994-08-04  |  615 b   |  53 lines  |  [TEXT/MPS ]

  1.  
  2.     case    on
  3.  
  4.     proc
  5.     export    %_ProB
  6.     export    %_ProE
  7.     export    SETPROFILEPROCS
  8.  
  9. %_ProB
  10.     move.l    pbegin,d0
  11.     bra.s    both
  12. %_ProE
  13.     move.l    pexit,d0
  14. both
  15.     beq.s    over
  16.     lea    inproc,a0
  17.     tst.b    (a0)
  18.     bne.s    over
  19.     move.b    #1,(a0)
  20.     move.l    a5,-(sp)
  21.     lea    mya5,a0
  22.     move.l    (a0),a5
  23.     move.l    d0,a0
  24.     jsr    (a0)
  25.     move.l    (sp)+,a5
  26.     lea    inproc,a0
  27.     clr.b    (a0)
  28. over
  29.     rts
  30.  
  31. ; procedure SetProfileProcs(pbegin,pexit:ProcPtr);
  32. SETPROFILEPROCS
  33.     move.l    (sp)+,a1
  34.     lea    procs,a0
  35.     move.l    (sp)+,(a0)+
  36.     move.l    (sp)+,(a0)+
  37.     move.l    a5,(a0)+
  38.     lea    inproc,a0
  39.     clr.b    (a0)
  40.     jmp    (a1)
  41.  
  42. procs
  43. pexit    dc.l    0
  44. pbegin    dc.l    0
  45. mya5    dc.l    0
  46. inproc    dc.b    0
  47.  
  48.     endp
  49.  
  50.     end
  51.  
  52. asm -wb "{active}"
  53.